package org.lanqiao.ssm.common.quartz.jobManage;

import java.text.SimpleDateFormat;
import java.util.Date;

import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;
import org.springframework.scheduling.quartz.QuartzJobBean;
/**
 *����һ
 *@DisallowConcurrentExecution
 */
public class QuartzOne extends QuartzJobBean {

	@Override
	protected void executeInternal(JobExecutionContext arg0)
			throws JobExecutionException {
		
		long startTime = System.currentTimeMillis();
		
		try {
			Thread.sleep(80000);
		} catch (InterruptedException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		
		long endTime = System.currentTimeMillis();
		Integer cost = (int) (endTime - startTime);
		System.out.println("任务一"+cost);
		System.out.println("任务一"+
				new SimpleDateFormat("yyyy-MM-dd HH:mm:ss ").format(new Date()));

	}

}
